package com.baizhi.luoht.entity;/**
 * @Author:luoht
 * @Description：
 * @Date：Create in 21:15 2018/10/23
 */

import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.stereotype.Service;

import java.io.Serializable;
import java.util.Date;

/**
 * @program: SpringMVC
 * @description:
 * @author: luoht
 * @create: 2018-10-23 21:15
 **/

public class User implements Serializable{
    private String username;
    private String password;
    private String realname;
    private Address address;

    /*@DateTimeFormat(pattern = "yyyy-MM-dd")*/
    private Date borndate;


    public User(String username, String password, String realname, Address address, Date borndate) {
        this.username = username;
        this.password = password;
        this.realname = realname;
        this.address = address;
        this.borndate = borndate;
    }

    public Date getBorndate() {
        return borndate;
    }


    @Override
    public String toString() {
        return "User{" +
                "username='" + username + '\'' +
                ", password='" + password + '\'' +
                ", realname='" + realname + '\'' +
                ", address=" + address +
                ", borndate=" + borndate +
                '}';
    }

    public void setBorndate(Date borndate) {
        this.borndate = borndate;
    }

    public User(String username, String password, String realname, Address address) {
        this.username = username;
        this.password = password;
        this.realname = realname;
        this.address = address;
    }

    public Address getAddress() {
        return address;
    }

    public void setAddress(Address address) {
        this.address = address;
    }

    public User(String username, String password, String realname) {
        this.username = username;
        this.password = password;
        this.realname = realname;
    }

    public User() {
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }


    public void setPassword(String password) {
        this.password = password;
    }

    public String getRealname() {
        return realname;
    }

    public void setRealname(String realname) {
        this.realname = realname;
    }
}
